#include "link_queue.h"
#include "../test.h"

int main(){
	struct mydata elem = {4,'d'},ee = {14,'e'}, e0,
			e1 = {1,'a'},e2 = {2,'b'},
			e3 = {3,'c'}, e4 = {4,'d'};
	link_queue q;
	linkqueue_init(&q, sizeof(struct mydata));
	linkqueue_enter(&q, (void *)&e1);
	linkqueue_enter(&q, (void *)&e2);
	linkqueue_enter(&q, (void *)&e3);
	linkqueue_delete(&q, (void *)&e0);
//	linkqueue_enter(&q, (void *)&e0);
	linkqueue_traverse(q, visit);
	linkqueue_destroy(&q);
	printf("%d\n", linkqueue_length(q));
}
